package com.lhnstart.learn.bases.cycle;

import java.util.Scanner;

/**
 * 多重循环
 *
 * @author lhn
 * @date 2022/10/25 19:55
 * @since 1.0.0
 **/
public class MulForExercise {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in); // 从键盘接收数据
        int sumNum = 0;
        int pass = 0;
        int j = 0;
        for (; j < 3; j++) {
            int myClass = 0;
            int i = 0;
            for (; i < 5; i++) {
                int nextInt = scan.nextInt();
                if (nextInt > 60) {
                    pass++;
                }
                System.out.println("nextInt = " + nextInt);
                myClass += nextInt;
            }
            sumNum += myClass;
            double avgNumber = myClass / i;
            System.out.println("avgNumber = " + avgNumber);
        }
        System.out.println(sumNum / j);
        System.out.println("及格人数：" + pass);
    }

}